ArcPad Scripting Object Model
List Forms Example
Send Feedback
ArcPad Scripting Object Model Reference > ArcPad Scripting Samples > List Forms Example

Glossary Item Box

Description

LayerForms determines if there is an Edit Form and/or Identify Form attached to a layer. It also determines the number of other layer forms, if any.

VBScript Code

Copy Code
 Sub LayerForms (objLayer, blnEForm, blnIForm, intOForms)
  Dim objFrm
  'Initialize arguments
  blnEForm = False
  blnIForm = False
  intOForms = 0
  If Not (objLayer.Forms.Count = 0) Then
    For Each objFrm in objLayer.Forms
      If objFrm.Name = "EditForm" Then
        blnEForm = True
      Elseif objFrm.Name = "IdentifyForm" Then
        blnIForm = True
      Else
        intOForms = intOForms + 1
      End If
    Next
  End If
  MsgBox "Edit Form? " & CStr(blnEForm) & VBCr &_
         "Identify Form? " & CStr(blnIForm) & VBCr &_
        "# Other Forms: " & CStr(intOForms) _
        , vbInformation, "Layer " & objLayer.Name
End Sub
©2012. All Rights Reserved.